package src.model.entity;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "TYPESS", schema = "HB")
@SequenceGenerator(name = "SEQ_GEN", sequenceName = "TYP_SEQ", initialValue = 1, allocationSize = 1)
public class Types extends abstractEntity{

		private String typesName;
		private Set<Movies> moviess;
		
		@Column(name="TYPE")
		public String getTypesName() {
			return typesName;
		}

		public void setTypesName(String typesName) {
			this.typesName = typesName;
		}
		
		@OneToMany(mappedBy="types")
		public Set<Movies> getMoviess() {
			return moviess;
		}
		
		public void setMoviess(Set<Movies> moviess) {
			this.moviess = moviess;
		}

		@Override
		public String toString() {
			return "Types [TypeName=" + typesName + "]";
		}
		
		
}
